package ru.myrtle.umf.tools.ugen;

import java.io.File;

import ru.myrtle.umf.UModel;
import ru.myrtle.umf.codegen.GenLog;
import ru.myrtle.umf.codegen.ResourceSet;

public class UGenLauncher {

    public static void main(String[] args) throws Exception {
        UGenConfig config = new UGenConfig();

        config.getPackages().add(
                UModel.INSTANCE
        );

        ResourceSet resourceSet = new ResourceSet(
                new File("myrtle-umf"), null
        );

        GenLog log = new GenLog();

        try {
            UGen.GENERATOR.generate(
                    config, resourceSet, log, config
            );
        }
        finally {
            log.print();
        }
    }
}
